<form method="post" action="/admin/user-group/create">
<div class="mainpage">
	<div class="top-tools">
        <?php echo $this->flashMessenger()?>
        <a href="/admin/user-group/read" class="exit  btn " ><i class="icon-hand-left hint" data-hint-msg="Thoát"></i></a>
        <div class="pull-right">
        </div>
        <div class="clear"></div>
    </div>
    <div class="row-fluid">
        <h3 class="form-legend">Add new group user</h3>
    </div>

    <div class="row-fluid">
		<table border="0" width="100%" cellpadding="5" class="form">
		    <tbody>
			    <tr>
			        <td class="form-label">
			            Name:
			        </td>
			        <td class="form-input">
			            <input type="text" name="group-title" style="width: 200px;" class="text" value="">
			        </td>
			    </tr>
			    <tr>
			        <td class="form-label">
			            To do:
			        </td>
			        <td class="form-input">
			            <input type="text" name="group-name" style="width: 200px;" class="text" value="">
			        </td>
			    </tr>
			    <tr>
			        <td class="form-label">
			            Permision(Access control):
			        </td>
			        <td class="form-input">
			        	<table bordercolor="#cccccc" border="1" width="100%" cellpadding="0" style="background: none repeat scroll 0% 0% rgb(255, 255, 255);">
			                <tbody><tr>
			                    <td valign="top">
			                        <table class="no-tb">
				                        <tbody>
				                            <tr class="well">
				                                <td align="center" width="10">
				                                    <input type="checkbox" class="big-checker">
				                                </td>
				                                <td>Product management</td>
				                            </tr>
				                            <tr>
				                                <td><input type="checkbox" name="roles[]" value="product"></td>
				                                <td>Product</td>
				                            </tr>
				                            <tr>
				                                <td><input type="checkbox" name="roles[]" value="product-category"></td>
				                                <td>Product category</td>
				                            </tr>
				                            <tr>
				                                <td><input type="checkbox" name="roles[]" value="product-image"></td>
				                                <td>Product image</td>
				                            </tr>
				                            <tr>
				                                <td><input type="checkbox" name="roles[]" value="product-status"></td>
				                                <td>Product status</td>
				                            </tr>
				                            <tr>
				                                <td><input type="checkbox" name="roles[]" value="product-color"></td>
				                                <td>Product color</td>
				                            </tr>
				                            <tr>
				                                <td><input type="checkbox" name="roles[]" value="product-size"></td>
				                                <td>Product size</td>
				                            </tr>
			                            </tbody>
			                        </table>
			                    </td>
				                <td valign="top">
			                        <table class="no-tb">
			                            <tbody>
				                            <tr class="well">
				                                <td align="center" width="10">
				                                    <input type="checkbox" class="big-checker">
				                                </td>
				                                <td>Customer vs Order</td>
				                            </tr>
	                                        <tr>
	                                            <td><input type="checkbox" name="roles[]" value="customer"></td>
	                                            <td>Customer</td>
	                                        </tr>
	                                        <tr>
	                                            <td><input type="checkbox" name="roles[]" value="order"></td>
	                                            <td>Order</td>
	                                        </tr>
	                                        <tr>
	                                            <td><input type="checkbox" name="roles[]" value="order-status"></td>
	                                            <td>Order type</td>
	                                        </tr>
	                                        <tr>
	                                            <td><input type="checkbox" name="roles[]" value="payment-type"></td>
	                                            <td>Payment type</td>
	                                        </tr>
				                        </tbody>
				                    </table>
			                    </td>
				                <td valign="top">
		                                <table class="no-tb">
		                                    <tbody>
		                                        <tr class="well">
		                                            <td align="center" width="10">
		                                                <input type="checkbox" class="big-checker">
		                                            </td>
		                                            <td>Enquire vs Contact</td>
		                                        </tr>
		                                        <tr>
		                                            <td><input type="checkbox" name="roles[]" value="enquire"></td>
		                                            <td>Enquire</td>
		                                        </tr>
		                                        <tr>
		                                            <td><input type="checkbox" name="roles[]" value="contact"></td>
		                                            <td>Contact</td>
		                                        </tr>
		                                    </tbody>
		                                </table>
		                            </td>
	                            </tr>
				                <tr>
				                    <td valign="top">
				                        <table class="no-tb">
				                            <tbody>
				                              <tr class="well">
					                                <td align="center" width="10">
					                                    <input type="checkbox" class="big-checker">
					                                </td>
					                                <td>Article management</td>
					                            </tr>
					                            <tr>
					                                <td><input type="checkbox" name="roles[]" value="event"></td>
					                                <td>Event</td>
					                            </tr>
					                            <tr>
					                                <td><input type="checkbox" name="roles[]" value="faqs"></td>
					                                <td>FAQS</td>
					                            </tr>
					                            <tr>
					                                <td><input type="checkbox" name="roles[]" value="faqs-category"></td>
					                                <td>FAQS type</td>
					                            </tr>
					                            <tr>
					                                <td><input type="checkbox" name="roles[]" value="article"></td>
					                                <td>Article</td>
					                            </tr>
					                        </tbody>
					                    </table>
				                    </td>
				                    <td valign="top">
				                        <table class="no-tb">
				                            <tbody>
				                              <tr class="well">
					                                <td align="center" width="10">
					                                    <input type="checkbox" class="big-checker">
					                                </td>
					                                <td>Photo Manager</td>
					                            </tr>
					                            <tr>
					                                <td><input type="checkbox" name="roles[]" value="ckfinder"></td>
					                                <td>CkFinder</td>
					                            </tr>
					                        </tbody>
					                    </table>
				                    </td>
				                    <td valign="top">
				                        <table class="no-tb">
				                            <tbody>
					                            <tr class="well">
					                                <td align="center" width="10">
					                                    <input type="checkbox" class="big-checker">
					                                </td>
					                                <td>System management</td>
					                            </tr>
					                            <tr>
					                                <td><input type="checkbox" name="roles[]" value="site-info"></td>
					                                <td>Site Info</td>
					                            </tr>
					                            <tr>
					                                <td><input type="checkbox" name="roles[]" value="site-setting"></td>
					                                <td>Site Setting & Reply message</td>
					                            </tr>
					                            <tr>
					                                <td><input type="checkbox" name="roles[]" value="gallery"></td>
					                                <td>Gallery slide show</td>
					                            </tr>
					                            <tr>
					                                <td><input type="checkbox" name="roles[]" value="support"></td>
					                                <td>Online supporter</td>
					                            </tr>
					                            <tr>
					                                <td><input type="checkbox" name="roles[]" value="user"></td>
					                                <td>User management</td>
					                            </tr>
					                            <tr>
					                                <td><input type="checkbox" name="roles[]" value="user-group"></td>
					                                <td>Group user management</td>
					                            </tr>
					                        </tbody>
					                    </table>
				                    </td>
				                </tr>
			            	</tbody>
			            </table>
			        </td>
			    </tr>
			    <tr>
			        <td class="form-label">
			            Ghi chú:
			        </td>
			        <td class="form-input">
			            <textarea name="description"></textarea>
			        </td>
			    </tr>
			    <tr>
			        <td class="form-label"></td>
			        <td class="form-input">
			            <input type="submit" class="btn btn-primary" value="Save">
			            <input type="reset" class="btn" value="Reset">
			        </td>
			    </tr>
			</tbody>
		</table>
    </div>
</div>
</form>
<style>
.form-label{width:150px;font-weight:bold}
.no-tb{width:100%}
.no-tb td{padding:5px}

</style>
<script>$(function(){$('.big-checker').live('click', function(e){$(this).parent().parent().parent().slice(0,1).find('input[name*=roles]').attr('checked',this.checked);});});</script>